package util;

import java.sql.SQLException;

import javax.sql.DataSource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Action {
	public static void main(String[] args) throws SQLException {
		ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
		DataSource dsDataSource = (DataSource)context.getBean("dataSource");
		DataSource dsDataSource1 = (DataSource)context.getBean("dataSource1");
		System.out.println(dsDataSource.getConnection());
		System.out.println(dsDataSource1.getConnection());
	}
}
